# 进制转换
'''
python将16进制转为10进制可以用int('hex型',16) 八进制转十进制int('八进制型',8) 八进制或十六进制或10进制装二进制直接调用 bin(任意进制)
eval('0b1111==0x0F==15')
'''


def convert():
    while True:
        try:
            # s = input()
            s = '0xaa'
            # convert to hexadecimal
            s_hex = int(s, 16)
            s_bin = bin(s_hex)
            print('十六进制：', s_hex)
            print('二进制：', s_bin)
        except:
            print('Input error')
            break
        break

# convert()

# 字符串排序
def zimupx():
    while True:
        try:
            # s = input()
            s = 'zsaw23rgb'
            # find alphabet and save to a
            a = ''
            for i in s:
                if i.isalpha():
                    a += i
            # used sorted() order by
            b = sorted(a, key=str.upper)
            # insert b into s by b.index
            f = ''
            index = 0
            for i in range(len(s)):
                # 字母则排序
                if s[i].isalpha():
                    f += b[index]
                    index += 1
                # 其它操持不变
                else:
                    f += s[i]
            print(s)
            print(f)
        except:
            print('Input error')
            break
        break
# zimupx()

# 四则运算,直接使用eval
def caculator():
    while True:
        try:
            # s = input()
            s = '9+4*5'
            # 大中括号替换为小括号
            s = s.replace('{', '(')
            s = s.replace("}", ")")
            s = s.replace("[", "(")
            s = s.replace("]", ")")
            # print(int(eval(s)))
            print(eval(s))
            break
        except:
            print('Input error')
            break
# caculator()

def argument_parser():
    while True:
        try:
            # str1 = str(input())
            str1 = 'xcopy /s c:\\ d:\\e "findstr log"'
            str1 = str1.replace(' ', '\n')
            # print(type(str1), str1)
            e = ''
            flag = False
            for i in str1:
                # print(i)
                # 用开关处理带参数的命令（因此带参数命令需要加双引号）
                # handle command with arguments with switches(so command with arguments require double quotes)
                if i == '"':
                    # print(i)
                    flag = not flag
                elif flag is True and i == '\n':
                    e += ' '
                # others are stored directly into var e
                else:
                    e += i
            # 最后一个参数无\n
            b = e.count('\n') + 1
            print(b)
            print(e)
            return e
            break
        except:
            print('Input error')
            break
# argument_parser()


# 字符串加解密
def func():
    def encrypt(a, b):
        # 加密密码表
        key1 = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
        key2 = 'BCDEFGHIJKLMNOPQRSTUVWXYZAbcdefghijklmnopqrstuvwxyza1234567890'
        result = ''
        # encrypt
        if b == 1:
            for i in a:
                result += key2[key1.index(i)]
        # decrypt
        elif b == -1:
            for i in a:
                result += key1[key2.index(i)]
        return result

    while True:
        try:
            # print(encrypt(input(), 1))
            # print(encrypt(input(), -1))
            str1 = 'chenqinzhao'
            # str1 = input()
            print(str1)
            # 加密
            str1 = encrypt(str1, 1)
            print(str1)
            print(str1)
            # 解密
            str1 = encrypt(str1, -1)
            print(str1)
        except:
            print('Input error')
            break
        break
# func()

# def catch():
#     while True:
#         try:
#             # str = input()
#             str = '123321'
#             print(str)
#             n = len(str)
#             list = []
#             for i in range(0, n - 1):
#                 for j in range(1, n):
#                     if str[j] == str[i] and str[i + 1:j] == str[j - 1:i:-1]:
#                         print(str[i + 1:j])
#                         print(str[j - 1:i:-1])
#                         list.append(len(str[i:j + 1]))
#                         print(list)
#             print(max(list))
#
#         except:
#             print('Input error')
#             break
#         break
# catch()


s = ' TestNet '
#print(s[0].capitalize() + s[1:])
# print(s.strip())

# print(eval('2==3 and 3>4'))
# print("Python" == "Python")
# print("PYTHON".lower() == "Python".lower())
my_list = [1, 2, 3, 2]
# print(my_list.count(2))
my_list.index(2)
for i in my_list:
    if i == 2:
        my_list[my_list.index(i)] = 4

# print(my_list)
# 统计top url
def count_url():
    top = 3
    url_list = []
    url_dic = {}
    count = 0
    while True:
        try:
            s = input()
            url_list.append(s)
            url_dic[s] = url_list.count(s)
        except:
            break
        # break
        # print(url_dic)
        url_tuplelist = list(zip(url_dic.values(), url_dic.keys()))
        url_tuplelist_sorted = sorted(url_tuplelist, reverse=True)
        # print(url_tuplelist)
        top_list = url_tuplelist_sorted[0:top]
        # top_list = sorted(top_list)
        print(top_list)
        for i in top_list:
            print(i[1], end=',')

# count_url()

# 求列表中任意两个元素之和的最小绝对值，元素只能用一次
def get_abs():
    res = []
    while True:
        try:
            # s = input()
            s = '1 -4 9 -7'
            s = [int(x) for x in s.split(' ')]
            # print(s)
            for i in range(len(s)-1):
                for j in range(1, len(s)):
                    if i != j:
                        sum = abs(s[i]+s[j])
                        res.append(sum)
                        print(s[i], s[j])
            # 如果元素只能用一次，先分组再求和
            # for x in s:
            #
            print(min(res))
        except:
            break
        break
# get_abs()


# 按字典值排序zip
# def count_url(top):
#     from random import randint
#     student_dict = {'student_%d' % i: randint(50, 100) for i in range(1, 21)}
#     student_tuplelist = list(zip(student_dict.values(), student_dict.keys()))
#     student_tuplelist_sorted = sorted(student_tuplelist, reverse=True)
#
#     print(student_dict)
#     print(student_tuplelist)
#     print(student_tuplelist_sorted[0:top])






def sum():
    while True:
        try:
            s = input()
            # s = [int(x) for x in s.split(' ')]
            s = s.replace(' ', '+')
            print(eval(s))
            # print(int(input()) + int(input()))
        except:
            break
        # break

sum()






